/**
 * Created by Administrator on 2017/3/22.
 */
$(document).ready(function(){
    $("#to_modify").on("click",function () {
        var form1 = $(".info-form");
        form1.hide();
        var form2 = $(".modify-form");
        form2.show();
    });
    $("#cancel").on("click",function () {
        var form1 = $(".modify-form");
        form1.hide();
        var form2 = $(".info-form");
        form2.show();
    });
    /*$("#userName").blur(function () {
        var userName = $("#userName").val();
        if(userName == ""){
            $("#name-tips").text("用户名不能为空！");
            $("#name-tips").css("color","#FF3030");
        }else {
            $(".your-name").text("用户名");
            $(".your-name").css("color","#696969");
            if(userName != ${User.name}+""){
                $.ajax({
                    url:"/register/check_name.action",
                    type:"post",
                    dataType:"json",
                    data:{
                        registerName:userName
                    },
                    success:function (data) {
                        if(data.checkResult == "user_exist"){
                            $("#name-tips").text("用户名"+userName+"已被占用！请重新输入");
                            $("#name-tips").css("color","#FF3030");
                            $("#userName").val("");
                        }
                    },
                    error:function (e) {
                        alert("程序错误："+e);
                    }
                });
            }
        }
    });*/

});